package com.weishu.core.entity;

public enum PaymentTypeEnum {
    SFFK("收房付款单",1),
    ZWFK("租务付款单",2),
    JYJS("解约结算付款",3),
    XYJS("续约结算付款",4);

    private String name;
    private int index;

    private PaymentTypeEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(int index) {
        for (PaymentTypeEnum c : PaymentTypeEnum.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
